<?php

/*

Forum Delete (forum_delete.pro.php)

*/
ob_start();
$rank_check = 4;
include "global.inc.php";

if ($topic)
{
	mysql_query("DELETE FROM forum_subjects2 WHERE id = '$topic' AND game = '$game'");
	mysql_query("DELETE FROM forum_topics2 WHERE id = '$topic' AND game = '$game'");
	mysql_query("DELETE FROM forum_replies2 WHERE thread = '$topic' AND game = '$game'");
	$str = "topic";
	record("Deleted Topic", "$username deleted topic #$topic", $timestamp, $game, $userid);
	die(header(error("view.php?game=$game&order=$order&id=$goto","The $str has been successfully deleted.")));
}

if ($reply)
{
	mysql_query("DELETE FROM forum_replies2 WHERE id = '$reply' AND game = '$game'");
	$str = "reply";
	record("Deleted Reply", "$username deleted reply #$reply", $timestamp, $game, $userid);
	die(header(error("view_topic.php?game=$game&id=$goto","The $str has been successfully deleted.")));

}

header(error("forums.php?game=$game","The $str has been successfully deleted."));

?>